<template>
  <div class="zst-box">
	<zst-header :title='title'></zst-header>
	<nav class="top-nav">
		<p :class="currentNav==1?'hover':''" @click='currentNav=1'>基本走势<span></span></p>
		<p :class="currentNav==2?'hover':''" @click='currentNav=2'>大小走势<span></span></p>
		<p :class="currentNav==3?'hover':''" @click='currentNav=3'>奇偶走势<span></span></p>
		<p :class="currentNav==4?'hover':''" @click='currentNav=4'>跨度走势<span></span></p>
		<p :class="currentNav==5?'hover':''" @click='currentNav=5'>和值走势<span></span></p>
	</nav>
    <div class="superbox">
		<div class="chart-container">
			<div class="chart-main">
				<div :class="currentNav==1?'page page1 active pageTit':'page page1 pageTit'" style="width:1750px;">
					<div class="nav-com">
						<div class="nav-item" style="display: block;">
							<div class="tit-record">
								<span :class="basicSort?'icon_jt_down flex_2':'icon_jt flex_2'" @click='sortData(basic,currentNav)'><p>期次</p></span>
								<span class="flex_10">
									<p>万位</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
									</div>
								</span>
								<span class="flex_10">
									<p>千位</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
									</div>
								</span>
								<span class="flex_10">
									<p>百位</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
									</div>
								</span>
								<span class="flex_10">
									<p>十位</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
									</div>
								</span>
								<span class="flex_10">
									<p>个位</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
									</div>
								</span>
								<span class="flex_2 line40">
									<p>和尾</p>
								</span>
								<span class="flex_2 line40">
									<p>跨度</p>
								</span>
								<span class="flex_2 line40">
									<p>奇偶比</p>
								</span>
								<span class="flex_2 line40">
									<p>大小比</p>
								</span>
								<span class="flex_2">
									<p>012路<br>个数比</p>
								</span>
							</div>
							<div class="com-record">
								<ul>
									<li v-for='(item,index) in basic' :key='index'>
										<span class="flex_2">{{item.periodId}}</span>
										<div class="flex_50 flex-box">
											<template v-for='(items,indexs) in item.origin'>
												<span v-if='items == 0' class="cur"><font>{{basicIndex[indexs]}}</font></span>
												<span v-else>{{items}}</span>
											</template>
										</div>
										<div class="flex_10 flex-box">
											<template v-for='(items,indexs) in item.basicw'>
												<span>{{items}}</span>
											</template>
										</div>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div class="zd-box">
						<ul>
							<li class="color_red">
								<span class="flex_2">出现次数</span>
								<div class="flex_50 flex-box">
									<template v-for='(item,index) in basicOther.appearCount'>
										<span>{{item}}</span>
									</template>
								</div>
								<div class="flex_10 flex-box">
									<span v-for='item in new Array(5)'>-</span>
								</div>
							</li>
							<li class="color_gray">
								<span class="flex_2">平均遗漏</span>
								<div class="flex_50 flex-box">
									<template v-for='(item,index) in basicOther.avgMiss'>
										<span>{{item}}</span>
									</template>
								</div>
								<div class="flex_10 flex-box">
									<span v-for='item in new Array(5)'>-</span>
								</div>
							</li>
							<li  class="color_blue">
								<span class="flex_2">最大遗漏</span>
								<div class="flex_50 flex-box">
									<template v-for='(item,index) in basicOther.maxMiss'>
										<span>{{item}}</span>
									</template>
								</div>
								<div class="flex_10 flex-box">
									<span v-for='item in new Array(5)'>-</span>
								</div>
							</li>
							<li  class="color_black">
								<span class="flex_2">最大连出</span>
								<div class="flex_50 flex-box">
									<template v-for='(item,index) in basicOther.maxContinuous'>
										<span>{{item}}</span>
									</template>
								</div>
								<div class="flex_10 flex-box">
									<span v-for='item in new Array(5)'>-</span>
								</div>
							</li>
						</ul>
					</div>
				</div>
				<div :class="currentNav==2?'page page2 active pageTit':'page page2 pageTit'" style="width:850px;">
					<div class="nav-com">
						<div class="nav-item" style="display: block;">
							<div class="tit-record">
								<span :class="bigOrSmallSort?'icon_jt_down':'icon_jt'" @click='sortData(bigOrSmall,currentNav)'><p>期次</p></span>
								<span>
									<p>万位</p>
									<div>
										<p>大</p>
										<p>小</p>
									</div>
								</span>
								<span>
									<p>千位</p>
									<div>
										<p>大</p>
										<p>小</p>
									</div>
								</span>
								<span>
									<p>百位</p>
									<div>
										<p>大</p>
										<p>小</p>
									</div>
								</span>
								<span>
									<p>十位</p>
									<div>
										<p>大</p>
										<p>小</p>
									</div>
								</span>
								<span>
									<p>个位</p>
									<div>
										<p>大</p>
										<p>小</p>
									</div>
								</span>
								<span class="flex_3">
									<p>大小比</p>
									<div>
										<p>0:5</p>
										<p>1:4</p>
										<p>2:3</p>
										<p>3:2</p>
										<p>4:1</p>
										<p>5:0</p>
									</div>
								</span>
							</div>
							<div class="com-record">
								<ul>
									<li v-for='(item,index) in bigOrSmall' :key='index'>
										<span class="flex_2">{{item.periodId}}</span>
										<template v-for='(items,indexs) in item.origin'>
											<span v-if='items == 0' :class="indexs>9?'cur_bf':indexs%2==0?'cur_d':'cur_x'"><font>{{bigOrSmallIndex[indexs]}}</font></span>
											<span v-else>{{items}}</span>
										</template>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div class="zd-box">
						<ul>
							<li class="color_red">
								<span class="flex_2 ">出现次数</span>
								<template v-for='(item,index) in bigOrSmallOther.appearCount'>
									<span>{{item}}</span>
								</template>
							</li>
							<li class="color_gray">
								<span class="flex_2">平均遗漏</span>
								<template v-for='(item,index) in bigOrSmallOther.avgMiss'>
									<span>{{item}}</span>
								</template>
							</li>
							<li  class="color_blue">
								<span class="flex_2">最大遗漏</span>
								<template v-for='(item,index) in bigOrSmallOther.maxMiss'>
									<span>{{item}}</span>
								</template>
							</li>
							<li  class="color_black">
								<span class="flex_2">最大连出</span>
								<template v-for='(item,index) in bigOrSmallOther.maxContinuous'>
									<span>{{item}}</span>
								</template>
							</li>
						</ul>
					</div>
				</div>
				<div :class="currentNav==3?'page page3 active pageTit':'page page3 pageTit'" style="width:850px;">
					<div class="nav-com">
						<div class="nav-item" style="display: block;">
							<div class="tit-record">
								<span :class="paritySort?'icon_jt_down ':'icon_jt'" @click='sortData(parity,currentNav)'><p>期次</p></span>
								<span>
									<p>万位</p>
									<div>
										<p>奇</p>
										<p>偶</p>
									</div>
								</span>
								<span>
									<p>千位</p>
									<div>
										<p>奇</p>
										<p>偶</p>
									</div>
								</span>
								<span>
									<p>百位</p>
									<div>
										<p>奇</p>
										<p>偶</p>
									</div>
								</span>
								<span>
									<p>十位</p>
									<div>
										<p>奇</p>
										<p>偶</p>
									</div>
								</span>
								<span>
									<p>个位</p>
									<div>
										<p>奇</p>
										<p>偶</p>
									</div>
								</span>
								<span class="flex_3">
									<p>奇偶比</p>
									<div>
										<p>0:5</p>
										<p>1:4</p>
										<p>2:3</p>
										<p>3:2</p>
										<p>4:1</p>
										<p>5:0</p>
									</div>
								</span>
							</div>
							<div class="com-record">
								<ul>
									<li v-for='(item,index) in parity' :key='index'>
										<span class="flex_2">{{item.periodId}}</span>
										<template v-for='(items,indexs) in item.origin'>
											<span v-if='items == 0' :class="indexs>11?'cur_bf':indexs%2==0?'cur_d':'cur_x'"><font>{{parityIndex[indexs]}}</font></span>
											<span v-else>{{items}}</span>
										</template>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div class="zd-box">
						<ul>
							<li class="color_red">
								<span class="flex_2">出现次数</span>
								<template v-for='(item,index) in parityOther.appearCount'>
									<span>{{item}}</span>
								</template>
							</li>
							<li class="color_gray">
								<span class="flex_2">平均遗漏</span>
								<template v-for='(item,index) in parityOther.avgMiss'>
									<span>{{item}}</span>
								</template>
							</li>
							<li  class="color_blue">
								<span class="flex_2">最大遗漏</span>
								<template v-for='(item,index) in parityOther.maxMiss'>
									<span>{{item}}</span>
								</template>
							</li>
							<li  class="color_black">
								<span class="flex_2">最大连出</span>
								<template v-for='(item,index) in parityOther.maxContinuous'>
									<span>{{item}}</span>
								</template>
							</li>
						</ul>
					</div>
				</div>
				<div :class="currentNav==4?'page page4 active pageTit':'page page4 pageTit'" style="width:1250px;">
					<div class="nav-com">
						<div class="nav-item" style="display: block;">
							<div class="tit-record">
								<span :class="spanSort?'icon_jt_down flex_2':'icon_jt flex_2'" @click='sortData(span,currentNav)'><p>期次</p></span>
								<span class="line40">
									<p>和值</p>
								</span>
								<span  class="line40">
									<p>跨度</p>
								</span>
								<span class="flex_10">
									<p>总跨度走势</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
									</div>
								</span>
								<span class="flex_9">
									<p>跨度形态分析</p>
									<div>
										<p>大</p>
										<p>小</p>
										<p>奇</p>
										<p>偶</p>
										<p>质</p>
										<p>合</p>
										<p>0路</p>
										<p>1路</p>
										<p>2路</p>
									</div>
								</span>
								<span class="line40">
									<p>振幅</p>
								</span>
								<span class="flex_10">
									<p>振幅走势</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
									</div>
								</span>
							</div>
							<div class="com-record">
								<ul>
									<li v-for='(item,index) in span' :key='index'>
										<span class="flex_2">{{item.periodId}}</span>
										<span>{{item.spancw[0]}}</span>
										<span>{{item.spancw[1]}}</span>
										<div class="flex_10 flex-box">
											<template v-for='(items,indexs) in item.spanOrigin1'>
												<span v-if='items == 0' class="cur_bf"><font>{{indexs}}</font></span>
												<span v-else>{{items}}</span>
											</template>
										</div>
										<div class="flex_9 flex-box">
											<template v-for='(items,indexs) in item.spanOrigin2'>
												<span v-if='items == 0' :class="indexs%2==0?'cur_d2':'cue_x2'"><font>{{spanIndex[indexs]}}</font></span>
												<span v-else>{{items}}</span>
											</template>
										</div>
										<span>{{item.spancw[2]}}</span>
										<div class="flex_10 flex-box">
											<template v-for='(items,indexs) in item.spanOrigin3'>
												<span v-if='items == 0' class="cur_bf"><font>{{indexs}}</font></span>
												<span v-else>{{items}}</span>
											</template>
										</div>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div class="zd-box">
						<ul>
							<li class="color_red">
								<span class="flex_2">出现次数</span>
								<template v-for='(item,index) in spanOther.appearCount'>
									<span>{{item}}</span>
								</template>
							</li>
							<li class="color_gray">
								<span class="flex_2">平均遗漏</span>
								<template v-for='(item,index) in spanOther.avgMiss'>
									<span>{{item}}</span>
								</template>
							</li>
							<li  class="color_blue">
								<span class="flex_2">最大遗漏</span>
								<template v-for='(item,index) in spanOther.maxMiss'>
									<span>{{item}}</span>
								</template>
							</li>
							<li  class="color_black">
								<span class="flex_2">最大连出</span>
								<template v-for='(item,index) in spanOther.maxContinuous'>
									<span>{{item}}</span>
								</template>
							</li>
						</ul>
					</div>
				</div>
				<div :class="currentNav==5?'page page5 active pageTit':'page page5 pageTit'" style="width:3250px">
					<div class="nav-com">
						<div class="nav-item" style="display: block;">
							<div class="tit-record">
								<span :class="sumvaluesSort?'icon_jt_down flex_2':'icon_jt flex_2'" @click='sortData(sumvalues,currentNav)'><p>期次</p></span>
								<span class="line40">
									<p>和值</p>
								</span>
								<span class="flex_46">
									<p>和值走势</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
										<p>10</p>
										<p>11</p>
										<p>12</p>
										<p>13</p>
										<p>14</p>
										<p>15</p>
										<p>16</p>
										<p>17</p>
										<p>18</p>
										<p>19</p>
										<p>20</p>
										<p>21</p>
										<p>22</p>
										<p>23</p>
										<p>24</p>
										<p>25</p>
										<p>26</p>
										<p>27</p>
										<p>28</p>
										<p>29</p>
										<p>30</p>
										<p>31</p>
										<p>32</p>
										<p>33</p>
										<p>34</p>
										<p>35</p>
										<p>36</p>
										<p>37</p>
										<p>38</p>
										<p>39</p>
										<p>40</p>
										<p>41</p>
										<p>42</p>
										<p>43</p>
										<p>44</p>
										<p>45</p>
									</div>
								</span>
								<span class="line40">
									<p>和尾</p>
								</span>
								<span class="flex_10">
									<p>和尾走势</p>
									<div>
										<p>0</p>
										<p>1</p>
										<p>2</p>
										<p>3</p>
										<p>4</p>
										<p>5</p>
										<p>6</p>
										<p>7</p>
										<p>8</p>
										<p>9</p>
									</div>
								</span>
								<span class="flex_4">
									<p>和值形态</p>
									<div>
										<p>奇</p>
										<p>偶</p>
										<p>大</p>
										<p>小</p>
									</div>
								</span>
								<span class="flex_4">
									<p>和尾形态</p>
									<div>
										<p>奇</p>
										<p>偶</p>
										<p>大</p>
										<p>小</p>
									</div>
								</span>
							</div>
							<div class="com-record">
								<ul>
									<li v-for='(item,index) in sumvalues' :key='index'>
										<span class="flex_2">{{item.periodId}}</span>
										<span>{{item.spancw[0]}}</span>
										<div class="flex_46 flex-box">
											<template v-for='(items,indexs) in item.spanOrigin1'>
												<span v-if='items == 0' class="cur_bf"><font>{{indexs}}</font></span>
												<span v-else>{{items}}</span>
											</template>
										</div>
										<span>{{item.spancw[1]}}</span>
										<div class="flex_10 flex-box">
											<template v-for='(items,indexs) in item.spanOrigin2'>
												<span v-if='items == 0' class="cur_bf"><font>{{indexs}}</font></span>
												<span v-else>{{items}}</span>
											</template>
										</div>
										<div class="flex_8 flex-box">
											<template v-for='(items,indexs) in item.spanOrigin3'>
												<span v-if='items == 0' :class="indexs%2==0?'cur_d':'cur_x'"><font>{{sumvaluesIndex[indexs]}}</font></span>
												<span v-else>{{items}}</span>
											</template>
										</div>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div class="zd-box">
						<ul>
							<li class="color_red">
								<span class="flex_2 ">出现次数</span>
								<template v-for='(item,index) in sumvaluesOther.appearCount'>
									<span>{{item}}</span>
								</template>
							</li>
							<li class="color_gray">
								<span class="flex_2">平均遗漏</span>
								<template v-for='(item,index) in sumvaluesOther.avgMiss'>
									<span>{{item}}</span>
								</template>
							</li>
							<li  class="color_blue">
								<span class="flex_2">最大遗漏</span>
								<template v-for='(item,index) in sumvaluesOther.maxMiss'>
									<span>{{item}}</span>
								</template>
							</li>
							<li  class="color_black">
								<span class="flex_2">最大连出</span>
								<template v-for='(item,index) in sumvaluesOther.maxContinuous'>
									<span>{{item}}</span>
								</template>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<footer class="footer">
		<span :class="currentNum==30?'hover':''" @click='changeBasicData(30,data)'>30期</span>
		<span :class="currentNum==50?'hover':''" @click='changeBasicData(50,data)'>50期</span>
		<span :class="currentNum==100?'hover':''" @click='changeBasicData(100,data)'>100期</span>
	</footer>
  </div>
</template>

<script>
import zstHeader from './head'
import {getTrend} from '@/api/user'
import { Toast } from 'vant';
export default {
	data() {
	    return {
	    	title:'',
	    	data:{},
	    	basic:[],
	    	basicOther:{},
	    	bigOrSmall:[],
	    	bigOrSmallOther:{},
	    	parity:[],
	    	parityOther:{},

	    	span:[],
	    	spanOther:{},
	    	sumvalues:[],
	    	sumvaluesOther:{},

	    	currentNum:30,
	    	currentNav:'1',
	    	basicSort:false,
	    	bigOrSmallSort:false,
	    	paritySort:false,

	    	spanSort:false,
	    	sumvaluesSort:false,

	    	basicIndex:['0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5','6','7','8','9'],
			bigOrSmallIndex:['大','小','大','小','大','小','大','小','大','小','0:5','1:4','2:3','3:2','4:1','5:0'],
			parityIndex:['奇','偶','奇','偶','奇','偶','奇','偶','奇','偶','0:5','1:4','2:3','3:2','4:1','5:0'],
			spanIndex:['大','小','奇','偶','质','合','0路','1路','2路'],
			sumvaluesIndex:['奇','偶','大','小','奇','偶','大','小']
	    }
	},
	props:['gid','currentNavs'],
	components:{
		zstHeader,
		// [Dialog.Component.name]: Dialog.Component,
	},
	watch: {
	　　　'$route' (to, from) {
			this.getInfo()
		}
	　　　　　
	},
	methods:{
		getData(gid){
			getTrend({"gid":gid}).then((v)=>{
				let data = v.data;
				let status = data.status,mess = data.message;
				if (status === "_0000") {
					data = data.data;
					let hot = [],hot100=[],hot30 = [];
					this.basicOther = {
						appearCount:data.basic.appearCount.replace(/\|/g,',').split(','),
						avgMiss: data.basic.avgMiss.replace(/\|/g,',').split(','),
						maxContinuous:data.basic.maxContinuous.replace(/\|/g,',').split(','),
						maxMiss: data.basic.maxMiss.replace(/\|/g,',').split(',')
					}
					this.bigOrSmallOther = {
						appearCount:data.bigOrSmall.appearCount.split(','),
						avgMiss: data.bigOrSmall.avgMiss.split(','),
						maxContinuous:data.bigOrSmall.maxContinuous.split(','),
						maxMiss: data.bigOrSmall.maxMiss.split(',')
					}
					this.parityOther = {
						appearCount:data.parity.appearCount.split(','),
						avgMiss: data.parity.avgMiss.split(','),
						maxContinuous:data.parity.maxContinuous.split(','),
						maxMiss: data.parity.maxMiss.split(',')
					}
					this.spanOther = {
						appearCount:[].concat(['-','-'],data.span.appearCount.split(',').slice(0,19),['-'],data.span.appearCount.split(',').slice(19,29)),
						avgMiss: [].concat(['-','-'],data.span.avgMiss.split(',').slice(0,19),['-'],data.span.avgMiss.split(',').slice(19,29)),
						maxContinuous:[].concat(['-','-'],data.span.maxContinuous.split(',').slice(0,19),['-'],data.span.maxContinuous.split(',').slice(19,29)),
						maxMiss:[].concat(['-','-'],data.span.maxMiss.split(',').slice(0,19),['-'],data.span.maxMiss.split(',').slice(19,29)),
					}
					this.sumvaluesOther = {
						appearCount:[].concat(['-'],data.sumvalues.appearCount.split(',').slice(0,46),['-'],data.sumvalues.appearCount.split(',').slice(46)),
						avgMiss:[].concat(['-'],data.sumvalues.avgMiss.split(',').slice(0,46),['-'],data.sumvalues.avgMiss.split(',').slice(46)),
						maxContinuous:[].concat(['-'],data.sumvalues.maxContinuous.split(',').slice(0,46),['-'],data.sumvalues.maxContinuous.split(',').slice(46)),
						maxMiss:[].concat(['-'],data.sumvalues.maxMiss.split(',').slice(0,46),['-'],data.sumvalues.maxMiss.split(',').slice(46)),
					}
					this.data = data;
					this.changeBasicData(30,data);
				}else{
					Toast(mess)
				}
			})
		},
		changeBasicData(num,v){
			let data = v;
			let basicData =  data.basic.trend.slice(0,num),
				bigOrSmallSortData = data.bigOrSmall.trend.slice(0,num),
				paritySortData = data.parity.trend.slice(0,num),
				sumvaluesSortData = data.sumvalues.trend.slice(0,num),
				spanSortData =  data.span.trend.slice(0,num);
			this.currentNum = num
			basicData = basicData.map((v,index)=>{
				let datas = {}
				Object.assign(datas,v,{
					'origin':v.origin.replace(/\|/g,',').split(','),
					'basicw':v.basicw.split(','),
					'num':index});
				return datas
			})
			bigOrSmallSortData = bigOrSmallSortData.map((v,index)=>{
				let datas = {}
				let origin = v.origin.split(',');
				Object.assign(datas,v,{'origin':origin,'num':index});
				return datas
			})
			paritySortData = paritySortData.map((v,index)=>{
				let datas = {}
				let origin = v.origin.split(',');
				Object.assign(datas,v,{'origin':origin,'num':index});
				return datas
			})
			spanSortData = spanSortData.map((v,index)=>{
				let datas = {}
				Object.assign(datas,v,{
					'spancw':v.spancw.split(','),
					'spanOrigin1':v.origin.split(',').slice(0,10),
					'spanOrigin2':v.origin.split(',').slice(10,19),
					'spanOrigin3':v.origin.split(',').slice(19,29),
					'num':index
				});
				return datas
			})
			sumvaluesSortData = sumvaluesSortData.map((v,index)=>{
				let datas = {}
				Object.assign(datas,v,{
					'spancw':v.sumcw.split(','),
					'spanOrigin1':v.origin.split(',').slice(0,46),
					'spanOrigin2':v.origin.split(',').slice(46,56),
					'spanOrigin3':v.origin.split(',').slice(56),
					'num':index
				});
				return datas
			})
			this.basic = basicData
			this.bigOrSmall = bigOrSmallSortData
			this.parity = paritySortData
			this.span = spanSortData
			this.sumvalues = sumvaluesSortData
		},
		sortData(data,current){
			if (current==1) {
				this.basicSort = !this.basicSort
			}
			if (current==2) {
				this.bigOrSmallSort = !this.bigOrSmallSort
			}
			if (current==3) {
				this.paritySort = !this.paritySort
			}
			if (current==4) {
				this.spanSort = !this.spanSort
			}
			if (current==5) {
				this.sumvaluesSort = !this.sumvaluesSort
			}
			data.sort(function(a,b){
				if (Number(a.num)-Number(b.num)>0) {
					return Number(b.num)-Number(a.num);
				}else{
					return Number(a.num)-Number(b.num);
				}
				
			})
		},
		getInfo(){//初使化
			this.currentNav = this.currentNavs;
			this.title = this.lottery[this.gid].name;
			this.getData(this.gid);
		}
	},
	created(){
		this.getInfo()
	},
	mounted () {

	}
};
</script>

<style lang="less" scoped>
	@import './style.less';
</style>

